<?php
	$searchKw = '';
	if (isset($_REQUEST['Folder']) && isset($_REQUEST['Folder']['name'])) $searchKw = $_REQUEST['Folder']['name'];
	$this->widget('bootstrap.widgets.BootNavbar', array(
	'fixed'=>false,
	'brand'=>'SVN Wrapper',
	'brandUrl'=>Yii::app()->baseUrl,
	#'collapse'=>true, // requires bootstrap-responsive.css
	'items'=>array(
		array(
			'class'=>'bootstrap.widgets.BootMenu',
			'items'=>array(
				array('label'=>Yii::t('label', 'Dự án'), 'url'=>array('/folder/')),
				array('label'=>'Log', 'url'=>array('/log')),
			),
		),
		'<form method="get" class="navbar-search pull-left">
	<input type="hidden" name="r" value="folder">
	<input type="text" class="search-query" name="Folder[name]" value="'.$searchKw.'" placeholder="Tìm dự án">
</form>',
		array(
			'class'=>'bootstrap.widgets.BootMenu',
			'htmlOptions'=>array('class'=>'pull-right'),
			'items'=>array(
				array('label'=>Yii::t('label', 'Registry'), 'url'=>array('/registry')),
				array('label'=>Yii::t('label', 'Tài khoản quản trị'), 'url'=>array('/user/role')),
				'----',
				array('label'=>'Đăng xuất ('.Yii::app()->user->name.')', 'url'=>array('/user/signOut', 'ru'=>Yii::app()->request->requestUri), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Đăng nhập', 'url'=>array('/user/signIn', 'ru'=>Yii::app()->request->requestUri), 'visible'=>Yii::app()->user->isGuest),
			),
		),
	),
));

Yii::app()->clientScript->registerLinkTag('shortcut icon', 'image/x-icon', Yii::app()->request->baseUrl.'/images/favicon.png');

?>